package com.hp.ssm.service.impl;

import com.github.pagehelper.PageHelper;
import com.hp.ssm.entity.Files;
import com.hp.ssm.entity.Patient;
import com.hp.ssm.mapper.FilesMapper;
import com.hp.ssm.service.FilesService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author 23129
 * service层
 */


@Service
public class FilesServiceImpl implements FilesService {
    @Resource
    private FilesMapper filesMapper;

    @Override
    public List<Files> showAll(Files files,Integer page, Integer limit) {
        PageHelper.startPage(page, limit);
        return filesMapper.showAll(files);
    }

    @Override
    public Patient chenckPuser(String puser) {
        return filesMapper.chenckPuser(puser);
    }

    @Override
    public int add(Files files) {
        return filesMapper.add(files);
    }

    @Override
    public int del(Integer cid) {
        return filesMapper.del(cid);
    }

    @Override
    public int cid(String puser) {
        return filesMapper.cid(puser);
    }

}
